package cas;

public class Message {
	private String suggest;
	private int status;

	public static final char GO = '0';
	public static final char BRAKE = '1';
	public static final char WAIT = '2';
	
	public static final int SAFE = 0;
	public static final int WARNING = 1;
	public static final int DANGER = 2;
	
	public Message(int status, char stat, double value) {
		super();
		switch (stat) {
		case GO:
			suggest = "Max speed : "+value+"Km/h";
			break;
		case BRAKE:
			suggest = "Decrease speed to "+value+"Km/h";
			break;
		case WAIT:
			suggest = "Wait until safe";
			break;
		default:
			suggest = "";
			break;
		}
		this.status = status;
	}
	public String getSuggest() {
		return suggest;
	}
	public void setSuggest(String suggest) {
		this.suggest = suggest;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	@Override
	public String toString() {
		return "Message [suggest=" + suggest + ", status=" + status + "]";
	}
	
	
}
